%% -*- coding: utf-8 -*-
%%   yatce
%%   Copyright (C) 2009   UENISHI Kota <kuenishi+yatce@gmail.com>
%%
%%     This program is free software: you can redistribute it and/or modify
%%     it under the terms of the GNU Lesser General Public License as published by
%%     the Free Software Foundation, either version 3 of the License, or
%%     (at your option) any later version.
%%
%%     This program is distributed in the hope that it will be useful,
%%     but WITHOUT ANY WARRANTY; without even the implied warranty of
%%     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
%%     GNU Lesser General Public License for more details.
%%
%%     You should have received a copy of the GNU Lesser General Public License
%%     along with this program.  If not, see <http://www.gnu.org/licenses/>.

-module(perf_controller_SUITE).
-author('kuenishi@gmail.com').

-compile(export_all).
-include("ct.hrl").

%% tests perf_controller, perf_timer, unit_performer here.
-define(SERVER_NAME, ?MODULE).

all()-> [start, stop].

init_per_suite(Config) ->    
    {ok,Pid}=gen_fsm:start({local, perf_timer}, perf_timer,1000,[]),
    Config.
end_per_suite(Config) -> 
%%    ok=gen_fsm:send_event(perf_timer, stop),
    Config.

start(Config)-> 
    yatce:start([{libdir, "../../../c_src"}]),
    FileName = '/tmp/test_perf_controller.tch',
    {ok,Pid}=gen_server:start({local, ?SERVER_NAME}, perf_controller, {[unit_performer0, unit_performer1], FileName},[{debug,[trace,log,statistics]}]),
    Config.
stop(Config)->
    ok=gen_server:call(?SERVER_NAME, stop),
    Config.
    
    
%% get()->
%%     T=?config(tcadb,Config),
    
